import request from '@/request/request'

//查找部门全部信息
export const GetAllDeptServer = (from) => {
    const params = new URLSearchParams()
    for (let k in from) {
        params.append(k, from[k])
    }
    return request.get('/dept', { params: params })
}

//删除部门
export const DeleteDeptServer = (id) => {
    return request.delete('/dept', { params: id })
}

//添加部门
export const AddDeptServer = (name) => {
    return request.post(`/dept/${name}`)
}

//编辑部门
export const EditDeptServer=(name,id)=>{
    return request.put(`/dept/${id}/${name}`)
}